package EA.testproblems;
import EA.*;
import EA.recording.*;
import RKUjava.util.RKUStringUtils;
import java.util.Hashtable;

/** 
    The purpose of this class is to model the concept of a control
    problem with numerical control values.  It is supposed to be subclassed
    into the problems your EA attempt to attack.<br>
    Note: The inherited variable "dimensions" contains the number of 
    control parameters.
*/
public class ControlNumericalProblem extends NumericalProblem
{
  /** The best controller found so far. */
  public NumericalController bestcontroller;
    
  public ControlNumericalProblem()
    {
      super();
    }

  /** Set the best controller found so far. When needed the problem will
      call getControl() and update the problem according to this.
      @param bc The best controller.
   */
  public void setBestController(NumericalController bc)
    {
      bestcontroller = bc;
    }

  /** Get the fitness of a controller. Must be used instead of
      objectivefunction.calcFitness().
      @param c The controller to get the fitness for. 
  */
  public double getFitness(NumericalController c)
    {
      return 0;
    }

  /** Get the fitness of a model setting. Used for system identification 
      problems.
      @param realpos The parameters for the model.
  */
  public double getFitness(double realpos[])
    {
      return 0;
    }
  
  /** Advance control problem for a number of steps using the best controller. 
      The control values are taken from current best controller.
  */
  public void updateProblem(int timesteps)
    {
    }

  /** Advance control problem for a number of steps using a given controller.
      @param c The controller to use.
      @param timesteps The number of timesteps to advance.
  */
  public void updateProblem(NumericalController c, int timesteps)
    {
    }

  /** Backup problem variables. 
   */
  public void backupProblem()
    {
    }

  /** Restore problem variables.
   */
  public void restoreProblem()
    {
    }
}
